Skip to content

docs: update res.clearCookie documentation for clarity and accuracy #2000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

bjohansebas
Copy link
Member

@bjohansebas bjohansebas commented Aug 2, 2025

Improve the message by expanding on how the cookie is cleared, and include a note about the deprecation of the max-age and expires options: in Express 4 they are still respected (not ignored), whereas in Express 5 they are ignored.

ref: expressjs/express#5792
ref: expressjs/express#5640
ref: expressjs/express#5672

closes: #1146

Preview: https://deploy-preview-2000--expressjscom-preview.netlify.app/en/4x/api.html#res.clearCookie, https://deploy-preview-2000--expressjscom-preview.netlify.app/en/5x/api.html#res.clearCookie

Note: We need to manage changes more effectively. Whenever there are changes, and once they have been released, a PR should be opened here to update the documentation. Improving these processes will help us keep our documentation better maintained.

cc: @expressjs/express-collaborators @expressjs/docs-wg

@bjohansebas bjohansebas requested a review from a team as a code owner August 2, 2025 16:48
Copy link

netlify bot commented Aug 2, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit f2e0f35
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/688fd5600acd6c0008bb59a8
😎 Deploy Preview https://deploy-preview-2000--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

This comment was marked as off-topic.

@bjohansebas bjohansebas requested a review from jonchurch August 2, 2025 16:51
@bjohansebas bjohansebas added docs Issues/pr concerning content 5.x Docs for 5.x version 4.x Docs for 4.x version labels Aug 3, 2025

This comment was marked as duplicate.

Copy link
Member

@ShubhamOulkar ShubhamOulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Docs for 4.x version 5.x Docs for 5.x version docs Issues/pr concerning content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

res.clearCookie API underdocumented
2 participants